#pragma once
#include "SceneRootChild.hxx"
#include "SceneMeshContext.hxx"

namespace Eifersucht
{
	class Scene; TinyTypeDecl( Scene );  

	class Scene // Represents the scene node collection 
	{
		struct _Internal_static_impl; typedef _Internal_static_impl StaticImpl; TinyTypeDecl( StaticImpl ); 
		struct _Internal_impl; typedef _Internal_impl Impl; TinyTypeDecl( Impl );

		friend MeshContext::_Internal_impl;
		friend Scene::_Internal_impl;

	public:

		Scene();
		~Scene();

		// Imports the scene from the file on disk.
		bool ImportFbx( _In_z_ String16 wszFile );		

		// Returns the scene root
		SceneChildPtr GetRootChild();

	protected:

		void InternalRestart();
		void InternalRelease();

		// This child is the root node of the whole scene 
		// Represents the scene transformation and scene node collection 

		RootChildPtr m_pRoot;

		static uint16 s_uRefcounter; // Indicates the number of instances created 
		static StaticImplPtr s_pImpl;
		ImplPtr m_pImpl;

	private:

		// Prevent copying.
		Scene( Scene const& );
		Scene &operator=( Scene const& );
	};
};